<?php
// http://210.118.69.147:8888/SBWebServer/parent_applist_sender.php/?parent_num=1
include("../Action/config.php");

//get parent_num who want to crawl data of app list
$parent_num = $_GET['parent_num'];

//get child_num that is be matched with the parent_bum
$sql = "SELECT * FROM CHILD WHERE parent_num= '$parent_num'";
$result = mysql_query($sql) or die("fail query");
$child_list = array();

while($row = mysql_fetch_array($result)){
	$child_num = $row['child_num'];
	$child_type = $row['child_type'];
	$child_name = $row['child_name'];
	$child_list[] = array("child_num"=>$child_num, 
		"child_type"=>$child_type, "child_name"=>$child_name);
}

$json_app_list = json_encode($child_list);
echo $json_app_list;
exit();
?>


